<div class="divColorbox">
    <div class="divColorbox_Header">
        <span><i class="fa fa-star"></i><span>艺人转工会</span></span>
        <a class="Refresh"></a><a class="Close"></a>
    </div>
    <div class="divColorbox_Body row">
        <div>
            <input name="User_ID" type="hidden"/>
            <div class="row">
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">用户ID</span>
                        <input id="User_ID" type="text" class="form-control" value="--" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">昵称</span>
                        <input id="NickName" type="text" class="form-control" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">手机号</span>
                        <input id="Phone" type="text" class="form-control" disabled/>
                    </div>
                </div>
            </div>
            <div class="space-6"></div>
            <div class="row">
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">QQ</span>
                        <input id="QQ" type="text" class="form-control" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">邮箱</span>
                        <input id="Anchor_Email" type="text" class="form-control" disabled/>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">艺人等级</span>
                        <input id="Level" type="text" class="form-control" disabled/>
                    </div>
                </div>
            </div>
            <div class="space-6"></div>
            <div class="row">
                <div class="col-sm-4">
                    <div class="input-group">
                        <span class="input-group-addon">公会ID</span>
                        <input id="Family_ID" type="text" class="form-control"/>
                    </div>
                </div>
            </div>
        </div>
        <div class="divColorbox_Footer">
            <button type="button" id="btnEdit_AlterFamily" class="btn btn-primary">
                <i class="fa fa-check"></i> 转公会
            </button>
            <button type="button" id="btnUndo"></button>
        </div>
    </div>
</div>
<script>
    $(function () {
        if (_PageData.flag != 0) {
            $.KOC.Tips.Open("Error", _PageData.flag, {
                Timeout: 1000,
                onClose: function () {
                    parent.$.colorbox.close();
                }
            });
            return;
        }
        //////////////////////////////////////////////////////////
        //转公会
        //////////////////////////////////////////////////////////
        $('#btnEdit_AlterFamily').click(function () {
            $.KOC.Loading.Open();
            $.ajax({
                url: '/ajax/user.user-anchor.anchormovefamily',
                type: 'post',
                dataType: 'json',
                data: {
                    User_ID: $.trim($('#User_ID').val()),
                    Family_ID: $.trim($('#Family_ID').val())
                },
                success: function (data) {
                    $.KOC.Loading.Close();
                    if (data.flag !== "") {
                        $.KOC.Tips.Open("Error", data.msg + "(" + data.flag + ")", {Timeout: 2000});
                        return;
                    }
                    $.KOC.Tips.Open('Success', '修改完成', {
                        Timeout: 1000,
                        onClose: function () {
                            parent.$.colorbox.close();
                            parent.window.location.href = "/user-manage/anchor-manage/list";
                        }
                    });
                }
            });
        });
        //////////////////////////////////////////////////////////
        //数据绑定
        //////////////////////////////////////////////////////////
        $('#User_ID').val(_PageData.User_ID);
        $('#NickName').val(_PageData.NickName);
        $('#Phone').val(_PageData.Anchor_Phone);
        $('#QQ').val(_PageData.QQ);
        $('#Anchor_Email').val(_PageData.Anchor_Email);
        $('#Level').val(_PageData.Level.Level);
        $('#Family_ID').val(_PageData.Family_ID);
        $('#RoomName').val(_PageData.RoomName);
    });
</script>